﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="OpenWaves.EPiServer.AdminTools.LogViewer.UI.FileContentPage" EnableViewState="false"%>

<%@ Import Namespace="OpenWaves" %>
<%@ Import Namespace="OpenWaves.EPiServer.AdminTools.LogViewer.UI" %>
<%@ Register Assembly="OpenWaves.Web" Namespace="OpenWaves.Web.Controls" TagPrefix="ow" %>
<asp:content contentplaceholderid="HeaderContentRegion" runat="server">
       <style type="text/css">
           pre
           {
            font-family:Tahoma;
            font-size:11px;
            margin :10px;
            line-height:1em;
           }
       </style>
</asp:content>
<asp:content contentplaceholderid="FullRegion" runat="server"> 
    <div class="EP-systemContainer">
        <ow:OptionalContentPlaceholder runat=server DataItem="<%# File %>">
                <h1><%= Html.Encode(File.Name)%> </h1>    
                
                <span class="EP-systemInfo"><b><%= TranslateFallback("path","Path") %>:</b> <%= Html.Encode(File.Path)%></span>
                <br />
                <span class="EP-systemInfo"><b><%= TranslateFallback("lastModified","Last modified") %>:</b> <%= File.LastModified%></span>
                <br />
                <span class="EP-systemInfo"><b><%= TranslateFallback("size","Size") %>:</b> <%= File.Size %></span>
                 <br />                 
                <span class="EP-systemInfo">
                    <asp:HyperLink NavigateUrl="<%# GetDownloadUrl() %>" runat="server">
                        <img src='<%= this.GetWebResourceImageUrl("Download.gif") %>' />
                    </asp:HyperLink>
                    <asp:HyperLink NavigateUrl="<%# GetDownloadUrl() %>" runat="server">
                        <%= TranslateFallback("download","Download") %> 
                    </asp:HyperLink>
                    &nbsp;&nbsp;
                    <asp:HyperLink NavigateUrl="<%# GetViewUrl() %>" runat="server">                    
                        <img src='<%= GetImageThemeUrl("Tools/Refresh.gif") %>' />
                    </asp:HyperLink>
                    <asp:HyperLink NavigateUrl="<%# GetViewUrl() %>" runat="server">
                        <%= TranslateFallback("refresh","Refresh") %> 
                    </asp:HyperLink>
                </span>
        </ow:OptionalContentPlaceholder>
        
        <asp:PlaceHolder runat=server Visible="<%# string.IsNullOrEmpty(ErrorMessage)==false %>">
            <span class="EP-systemMessage">
                <table cellspacing="5">
                    <tbody>
                        <tr>
                            <td><%= Html.Encode(ErrorMessage)%></td>
                        </tr>
                    </tbody>
                </table>
            </span>        
        </asp:PlaceHolder>

        <asp:PlaceHolder runat=server Visible="<%# string.IsNullOrEmpty(WarningMessage)==false %>">
            <span class="EP-systemMessage">
                <table cellspacing="5">
                    <tbody>
                        <tr>
                            <td><%= Html.Encode(WarningMessage)%></td>
                        </tr>
                    </tbody>
                </table>
            </span>        
        </asp:PlaceHolder>
    </div>

    <ow:OptionalContentPlaceholder runat=server DataItem="<%# Exception %>">
        <p><pre ><%= Html.Encode(this.Exception.ToString()) %></pre></p>
    </ow:OptionalContentPlaceholder>
    
     <ow:OptionalContentPlaceholder runat=server DataItem=<%# FileContent %>>
        <div style="overflow:auto; border:solid 1px black; margin-top:20px ">
            <pre ><%=Html.Encode(this.FileContent) %></pre>
        </div>
    </ow:OptionalContentPlaceholder>
    
</asp:content>
